class Solution:
    def multiply(self, A: int, B: int) -> int:
        def multi(A,count):
            if count==1:
                return A
            return A+multi(A,count-1)
        if A>B:
            return multi(A,B)
        else:
            return multi(B,A)